import QtQuick 1.1
import com.nokia.meego 1.0

Flickable {
//    anchors{
//        fill: parent
//        margins: 10
//    }
    width: 480
    flickableDirection: Flickable.VerticalFlick
    contentHeight: Math.max(miniatura.height+detailsColumn.height,miniatura.height)
    contentWidth: 480
    Image {
        id:miniatura
        anchors {top: parent.top;left: parent.left}
        source: demoty_picture_thumb
        MouseArea{
            anchors.fill: parent
            onClicked: demotElement.flipped=!demotElement.flipped
        }
    }
    Column {
        id: detailsColumn
        anchors{
            left: miniatura.right
            top: parent.top
            right: parent.right
        }
        spacing: 4
        Text{
            width: parent.width
            text: demoty_title;color: "white";font{bold: true;pointSize: 24}
            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
        }
        Text{
            width: parent.width
            text:demoty_text;color:"white";font{pointSize: 18}
            wrapMode: Text.WrapAtWordBoundaryOrAnywhere
        }
        DemotOpisElement{
            title:"Autor:"
            value: demoty_author
        }
        DemotOpisElement{
            title:"Adres strony:"
            value:demoty_url
            isUrl: true
        }
        DemotOpisElement{
            title:"Data dodania:"
            value:demoty_dateadded
        }
        DemotOpisElement{
            title:"Ocena:"
            value:demoty_points
        }
        DemotOpisElement{
            title:"Liczba głosów:"
            value:demoty_votes
        }
    }
}
